/**
 * Created with IntelliJ IDEA.
 * Description:
 */

import java.util.ArrayList;
import java.util.List;

class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode() {}
    TreeNode(int val) { this.val = val; }
    TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}

class Solution {

    List<Integer> retlist = new ArrayList<>();
    public List<Integer> inorderTraversal(TreeNode root) {
        if(root == null) return retlist;

        inorderTraversal(root.left);
        retlist.add(root.val);
        inorderTraversal(root.right);
        return retlist;
    }
}
